<template>
  <tab-bar class="tab-bar">
      <tab-bar-item path="/home">
        <template v-slot:item-img>
          <img src="@/assets/img/tabbar/home.svg">
        </template>
        <template v-slot:item-img-active>
          <img src="@/assets/img/tabbar/home-active.svg">
        </template>
        <template v-slot:item-text>首页</template>
      </tab-bar-item>

      <tab-bar-item path="/shopcar">
        <template v-slot:item-img>
          <img src="@/assets/img/tabbar/shopcar.svg">
        </template>
        <template v-slot:item-img-active>
          <img src="@/assets/img/tabbar/shopcar-active.svg">
        </template>
        <template v-slot:item-text>购物车</template>
      </tab-bar-item>

      <tab-bar-item path="/category">
        <template v-slot:item-img>
          <img src="@/assets/img/tabbar/category.svg">
        </template>
        <template v-slot:item-img-active>
          <img src="@/assets/img/tabbar/category-active.svg">
        </template>
        <template v-slot:item-text>分类</template>
      </tab-bar-item>      

      <tab-bar-item path="/profile">
        <template v-slot:item-img>
          <img src="@/assets/img/tabbar/profile.svg">
        </template>
        <template v-slot:item-img-active>
          <img src="@/assets/img/tabbar/profile-active.svg">
        </template>
        <template v-slot:item-text>我的</template>
      </tab-bar-item>
  </tab-bar>
</template>

<script>
import TabBar from "@/components/common/tabbar/TabBar";
import TabBarItem from "@/components/common/tabbar/TabBarItem";

export default {
  components: {
    TabBar,
    TabBarItem
  }
}
</script>

<style scoped>
.tab-bar {
  width: 100vw;
}
</style>